package edu.ccut.saturn.basevalidate.prvalidate;

import edu.ccut.saturn.component.DefaultSaturnValidate;
import edu.ccut.saturn.component.ValidateResult;

public class OnlyEnglishCharacterValidate extends DefaultSaturnValidate {

	private static final String englishCharRegExpr = "[A-Za-z]+";

	public void doValidate(Object value, Object[] args, ValidateResult result) {
		if (!(value.toString()).matches(englishCharRegExpr)) {
			sendError(_ERROR_, value, result);
		}
	}
}
